package com.ocom.webapi.controller;

import com.ocom.common.constant.WebApiServiceUrl;
import com.ocom.common.request.IdRequest;
import com.ocom.common.request.payconfig.EvaluateListRequest;
import com.ocom.common.resp.Result;
import com.ocom.webapi.feign.CompanyClientService;
import com.ocom.webapi.feign.PayConfigClientService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Date 2024-06-11 czy
 */
@PreAuthorize("@pms.hasRole('ROLE_WEB')")
@Slf4j
@RestController
public class EvaluateController {

    @Autowired
    PayConfigClientService payConfigClientService;

    @PostMapping(WebApiServiceUrl.Url_EvaluateOnShow)
    public Result EvaluateOnShow(@RequestBody EvaluateListRequest request) {
        return payConfigClientService.evaluateList(request);
    }
}
